-- GENERATED SPELL FOR [Infested Root-Walker] --


function spell0_22095(pUnit, Event) --@Regrowth,n/a--
pUnit:FullCastSpellOnTarget(39000,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22095', 23000, 1)
end

function spell1_22095(pUnit, Event) --@Summon Wood Mites,Self--
pUnit:FullCastSpellOnTarget(39130,pUnit)
pUnit:RegisterEvent('Sorts_22095', 656, 1)
end

function Sorts_22095(pUnit, Event)
local choix_sorts_22095 = math.random(0, 1)
if choix_sorts_22095 == 0 then
pUnit:RegisterEvent('spell0_22095', 1, 1)
end
if choix_sorts_22095 == 1 then
pUnit:RegisterEvent('spell1_22095', 1, 1)
end
end

function mob22095_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22095', math.random(1500, 3000), 1)
end

function mob22095_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22095_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22095_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22095, 1, 'mob22095_Action')
RegisterUnitEvent(22095, 2, 'mob22095_Leave')
RegisterUnitEvent(22095, 3, 'mob22095_Kill')
RegisterUnitEvent(22095, 4, 'mob22095_Die')
